package net.xiezihao.userservice.controller;

import net.xiezihao.userservice.domain.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/userService")
public class UserController {
    private Logger logger = LoggerFactory.getLogger(getClass());

    @RequestMapping("/get")
    public Map getUser() {
        logger.info("userService - get");
        User user = new User(1, "谢子豪", 11);
        HashMap<Object, Object> map = new HashMap<>();
        map.put("info", user);
        return map;
    }
}
